﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Box.Entities;
using Box.Repository;
using Microsoft.Practices.Unity;

namespace Box.BL
{   
public class InsumoBL:IInsumoBL
    {
        [Dependency]
        public IInsumoRepository insumoRepository { get; set; }
    
        public List<Insumo> GetAllFromInsumos()
        {
            return insumoRepository.GetAllFromInsumos();
        }

        public List<Insumo> GetFromInsumosByCriterio(string criterio)
        {
            return insumoRepository.GetFromInsumosByCriterio(criterio);
        }

        public Insumo GetFromInsumosById(int id)
        {
            return insumoRepository.GetFromInsumosById(id);
        }

        public void AddInsumo(Insumo Insumo)
        {
            insumoRepository.AddInsumo(Insumo);
        }

        public void UpdateInsumo(Insumo Insumo)
        {
            insumoRepository.UpdateInsumo(Insumo);
        }

        public void RemoveInsumo(int id)
        {
            insumoRepository.RemoveInsumo(id);
        }

        public bool ExisteInsumo(int id)
        {
            throw new NotImplementedException();
        }
    }
}
